// 导入网络请求模块

import {
  axios
} from "./requets"

// 导入接口地址
import{
  REQUEST_PATH
} from"./requestPath";


// 获取tab数据
const getTabsData = () => {
  // 使用导入的接口地址 ，发起请求
  return axios(REQUEST_PATH.TABS);
}

// 获取tabView数据
const getTabViewData = (url)=> {
  return axios(url);
}

// 文章简易详情
const getMediaPlayPath = (vid) => {
  return axios(REQUEST_PATH.MEDIA_PLAY + vid);
}

const getArticleDetail = (id) => {
  return axios(REQUEST_PATH.ARTICLE_DETAIL + id)
}

// 相关视频
const getAssociationArticle = (id) => {
  return axios(REQUEST_PATH.ARTICLE_DETAIL + id + REQUEST_PATH.ASSOCIATION_ARTICLE);
}

// 导出数据模块
module.exports = {
  getTabsData,
  getTabViewData,
  getMediaPlayPath,
  getArticleDetail,
  getAssociationArticle
}